Conventionally, an IC card performs data communication with an IC card processing apparatus using a communication buffer provided on a working memory, and if the IC card transmits or receives data having a size that exceeds the size of the communication buffer, the IC card needs to perform control such as dividing the data.
For example, if the length of a response APDU is longer than the buffer size of a communication protocol in secure messaging processing, a conventional IC card divides data such that the length of the response APDU does not exceed the buffer size, or responds with the response APDU that exceeds the buffer size. This selection depends on the implementation of individual IC cards, and thus the conventional IC card sometimes has a problem in compatibility of communication with the IC card processing apparatus. Also, there is a limitation on the size of a memory of the IC card, and thus there is also a problem in that the buffer size cannot be extended easily.